package cn.blog.controller.back;

import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Date;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import cn.blog.controller.BaseServlet;
import cn.blog.entity.origin.User;
import cn.blog.service.back.ManageblogService;

@WebServlet("/back/manageblog")
public class Manageblog extends BaseServlet {
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
	
		ManageblogService ms = new ManageblogService();
		User user = (User) req.getSession().getAttribute("user");
		List<User> userlst = ms.getBlogs();
		req.setAttribute("userlst", userlst);
		
		//获取请求参数
//		String account = req.getParameter("userAccount");
//		int state =req.getParameter("state");
//		System.out.println(account);
//		
//			int result = ms.updateState(state, account);
//			req.setAttribute(state, result);
			forward("/back/manageblog");
		
			
		}
		
		
		
	}


